package basics;
import tween.Tween;
import pixi.core.text.Text;
import pixi.core.display.Container;

class GameTips extends Container{

	private var _text:Text;

    public function new(?msg:String = "") {
		super();

		_text = new Text(msg);
		_text.anchor.set(0.5);
		this.addChild(_text);
		this.show();
    }

	public function show(){
		Tween.get(this._text).call(function(){
			trace("tween y1 ", Date.now().getSeconds());
		}).to({
			y: -100,
		}, 1.2 * 1000).wait(1000).call(function(){
			this.parent.removeChild(this);
		});
	}
}
